.bin-scrollbar {
  position: relative;
  overflow: hidden;
  height: 100%;
  &:active, &:focus, &:hover {
    > .bin-scrollbar__bar {
      opacity: 1;
      transition: opacity .3s ease-out;
    }
  }
}

.bin-scrollbar__wrap {
  overflow: auto;
  height: 100%;
}

// 默认隐藏原生滚动条宽度
.bin-scrollbar__wrap--hidden-default {
  scrollbar-width: none
}
.bin-scrollbar__wrap--hidden-default::-webkit-scrollbar {
  display: none
}
.bin-scrollbar__bar {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity .12s ease-out;
  &.is-horizontal {
    height: var(--bin-scrollbar-width);
    left: 0;
    > div {
      height: 100%;
    }
  }
  &.is-vertical {
    width: var(--bin-scrollbar-width);
    top: 0;
    > div {
      width: 100%;
    }
  }
  &.always {
    opacity: 1;
  }
}

.bin-scrollbar__thumb {
  position: relative;
  display: block;
  width: 0;
  height: 0;
  cursor: pointer;
  border-radius: var(--bin-scrollbar-radius);
  background: rgba(0, 0, 0, 0.2);
  transition: box-shadow var(--bin-animation-duration-base);
  &:hover {
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  }
}
